import request from '@/libs/request'

export const api ={
	/*create_time: new Date().Format("yyyy-MM-dd hh:mm:ss"),*/
	//userOauth:function(data) {return request({url: '/api/Index/userOauth',method: 'POST',data});}//编辑文章
	dataList:function(data) {return request({url: '/api/Order/dataList',method: 'GET',data});},//订单列表
	dataInfo:function(data) {return request({url: '/api/Order/dataInfo',method: 'GET',data});},//订单列表
	deleteOrder:function(data) {return request({url: '/api/Order/deleteOrder',method: 'GET',data});},//删除订单
	delOrderItem:function(data) {return request({url: '/api/Order/delOrderItem',method: 'GET',data});},//删除订单
	submitOrder:function(data) {return request({url: '/api/Order/submitOrder',method: 'POST',data});},//提交订单
	auditOrder:function(data) {return request({url: '/api/Order/auditOrder',method: 'GET',data});},//提交订单
	rebackOrder:function(data) {return request({url: '/api/Order/rebackOrder',method: 'GET',data});},//提交订单
	getOptInfo:function(data) {return request({url: '/api/Order/getOptInfo',method: 'GET',data});},//提交订单
	orderRefund:function(data) {return request({url: '/bank/Index/refundApply',method: 'GET',data});},//提交订单
	refundQuery:function(data) {return request({url: '/bank/Index/refundQuery',method: 'GET',data});},//查询退款
	checkPay:function(data) {return request({url: '/bank/Index/checkPay',method: 'GET',data});},//加测付款状态
	setPayStatus:function(data) {return request({url: '/api/Order/setPayStatus',method: 'GET',data});},//加测付款状态
	setDeliverStatus:function(data) {return request({url: '/api/Order/setDeliverStatus',method: 'POST',data});},//加测付款状态
	getWarehouseList:function(data) {return request({url: '/api/Order/getWarehouseList',method: 'POST',data});},//加测付款状态
	orderClone:function(data) {return request({url: '/api/Order/orderClone',method: 'POST',data});},//加测付款状态
	
	orderStatus:[{"key":"0","val":"全部"},{"key":"1","val":"未提交"},{"key":"2","val":"待审核"},{"key":"2.1","val":"待支付"},{"key":"2.3","val":"已支付"},{"key":"2.2","val":"已退货"},{"key":"3","val":"待同步"},{"key":"4","val":"入库中"},{"key":"5","val":"已入库"},{"key":"5.1","val":"待发货"},{"key":"5.2","val":"已发货"},{"key":"6","val":"已出货"}], 
	cerpStatus:{"1":"待同步","2":"同步失败","3":"待发货","4":"已发货"},
	orderType:[{"key":"0","val":"全部"},{"key":"1","val":"非标"},{"key":"2","val":"标准"},{"key":"3","val":"付款专用"},{"key":"4","val":"管易"},{"key":"5","val":"汽车膜"}],
	
	orderStatusMap:function(){
		let retInfo={};
		for(let index in api.orderStatus){
			let item=api.orderStatus[index];
			retInfo[item.key]=item.val;
		}
		return retInfo
	}
}

